import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    num:1
  },
  getters: {
  },
  mutations: {
    //方法名(state){//操作state的数据}
    increment(state){
      state.num++
    },
    increment2(state,params){
     if(state.num<=params.params2){
       state.num+=params.params1
     }
     
    }
  },
  actions: {
  },
  modules: {
  }
})
